Rect

public interface Rect

A rectangle described by the location and dimensions.

Functions

Link copied to clipboard
public static Rect empty()
Returns an empty Rect with empty origin and size.
Link copied to clipboard
public int height()
Returns the rectangle vertical dimension.
Link copied to clipboard
public static Rect of(Size size)
Returns the Rect instance for the empty origin and the given size value.
public static Rect of(Point origin, Size size)
Returns the Rect instance for the given origin and size values.
public static Rect of(int width, int height)
Returns the Rect instance for the given width and height values.
public static Rect of(int x, int y, int width, int height)
Returns the Rect instance for the given x, y, width, and height values.
Link copied to clipboard
public Point origin()
Returns the upper-left corner of the rectangle.
Link copied to clipboard
public Size size()
Returns the rectangle dimensions.
Link copied to clipboard
public int width()
Returns the rectangle horizontal dimension.
Link copied to clipboard
public int x()
Returns the horizontal coordinate of the upper-left corner of the rectangle.
Link copied to clipboard
public int y()
Returns the vertical coordinate of the upper-left corner of the rectangle.